import 'package:bxultimate/app/router/router_name.dart';
import 'package:bxultimate/data/request/home_request.dart';
import 'package:bxultimate/data/store/im_store.dart';
import 'package:bxultimate/domain/home/home_data_dto.dart';
import 'package:get/get.dart';

import 'state.dart';

class HomeIndexController extends GetxController {
  final HomeIndexState state = HomeIndexState();


  @override
  void onInit() {
    // TODO: implement onInit
    super.onInit();

    getHomeData();
  }

  getHomeData() async {
    state.homeData = await HomeRequest.appHome();
  }


  toArticleDetail(Article article){
    Get.toNamed(RouterName.articleDetail,arguments: article.id);
  }
}
